<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			uni.login({
				success: function(loginRes) {
					// loginRes中包含重要参数code
					uniCloud.callFunction({
						name: 'getSessionkey',
						data: loginRes
					}).then((res) => {
						console.log(res)
						uni.setStorageSync('openid', res.result.openid)						
					}).catch((err) => {
						console.log(err)
					})
				}
			});
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	.info-button {
		background: #000;
		opacity: 0.7;
		color: #e0e0e0;
		font-size: 32px;
		line-height: 60px;
		text-align: center;
		left: 10px;
		width: 60px;
		height: 60px;
		display: inline-block;
		position: absolute;
		border-radius: 50%;
		border: 1px #e0e0e0 solid;
	}
</style>
